package at.fhv.components.source;

import java.beans.EventSetDescriptor;
import java.beans.MethodDescriptor;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;

import at.fhv.framework.listeners.ImageProcessingListener;

/**
 * The ImageSourceBeanInfo class.
 * 
 * @author Michael Sieber
 */
public class ImageSourceBeanInfo extends SimpleBeanInfo {
	@Override
	public EventSetDescriptor[] getEventSetDescriptors() {
		try {
			// bean name
			Class<?> localClass1 = ImageSource.class;
			String str1 = "ImageSource";

			// method names
			Class<?> localClass2 = ImageProcessingListener.class;
			String[] arrayOfString = { "imageChanged" };
			String str2 = "addImageChangeListener";
			String str3 = "removeImageChangeListener";

			// add method names
			EventSetDescriptor localEventSetDescriptor =
					new EventSetDescriptor(localClass1, str1, localClass2,
							arrayOfString, str2, str3);
			EventSetDescriptor[] arrayOfEventSetDescriptor =
					{ localEventSetDescriptor };
			return arrayOfEventSetDescriptor;
		} catch (Exception localException) {
			localException.printStackTrace();
		}
		return null;
	}

	@Override
	public MethodDescriptor[] getMethodDescriptors() {
		MethodDescriptor[] arrayOfMethodDescriptor = new MethodDescriptor[0];
		return arrayOfMethodDescriptor;
	}

	@Override
	public PropertyDescriptor[] getPropertyDescriptors() {
		try {

			// set property names
			Class<?> localClass = ImageSource.class;
			PropertyDescriptor localPropertyDescriptor1 =
					new PropertyDescriptor("path", localClass);
			PropertyDescriptor[] arrayOfPropertyDescriptor =
					{ localPropertyDescriptor1 };
			return arrayOfPropertyDescriptor;
		} catch (Exception localException) {
			localException.printStackTrace();
		}
		return null;
	}
}
